// const Router = require('koa-router');
const studentController = require('../../controller/studentController');
const express = require("express"); //express框架
const router = express.Router(); //express框架路由
// const router = new Router({ prefix: '/api/student' });

const { getStudentList, createStudent, updateStudent, deleteStudent, exportStudents, importStudents, downloadTemplate, previewImport, confirmImport } = require("../../controller/studentController");
router.get('/list', getStudentList);
router.post('/add', createStudent);
router.put('/update/:id', updateStudent);
router.delete('/delete/:id', deleteStudent);
router.get('/export', exportStudents);
router.post('/import', importStudents);
router.get('/template', downloadTemplate);
router.post('/preview-import', previewImport);
router.post('/confirm-import', confirmImport);

module.exports = router; 